﻿using Volo.Abp.DependencyInjection;
using YAPACS.RisServer.Abstractions;
using YAPACS.Workflows;

namespace YAPACS.RisServer.Workflows.HomePage
{
    public class GetHomeCardData(IHomeCardService homeCardService) : WorkflowBase, IGetHomeCardData, ITransientDependency
    {
        private readonly IHomeCardService _homeCardService= homeCardService;

        protected override async Task<WorkflowOutput> InvokeCoreAsync(WorkflowInput input)
        {
            var items = _homeCardService.GetHomeCardData();
            WorkflowOutput output = new WorkflowOutput { Data = items };
            await Task.CompletedTask;
            return output;
        }
    }
}
